<?php
namespace shenka\controllers;

use Yii;
use yii\web\Controller;
use shenka\models\EditionUser;
use shenka\controllers\classes\QueryClass;

/*
* @author admin 
* @class Advent
* @desc 星球大冒险（中） 激活占比
*/

class AdventController extends Controller {
	/*
	* @author admin 
	* @function Prodev
	* @desc 设备激活比
	*/
	public function actionProdev(){
		
		$view = Yii::$app->view;
		$view->params['layout_data'] = '星球大冒险（中）';
		$device = EditionUser::find()->select(["count(id) as count",'device'])->groupBy(['device'])->asArray()->all();
		$pro = QueryClass::getGroupCount($device,'device');
		return $this->render('prodev',['pro'=>json_encode($pro)]);
	}
}